﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Controls;

namespace CapaPresentacion.ValidationRules
{
    internal class StringNotNullValidationRule : ValidationRule
    {
        public override ValidationResult Validate(object value, System.Globalization.CultureInfo cultureInfo)
        {
            String stringValue = (String)value;

            if (String.IsNullOrEmpty(stringValue.Trim()))
            {
                return new ValidationResult(false, "Este campo es de ingreso obligatorio");
            }
            else
            {
                return ValidationResult.ValidResult;

            }
        }
    }
}
